//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class DashStop : IOfficeXmlSerializable
    {
        private int d;

        private int sp;

        public int Length
        {
            get { return d; }
            set { d = value; }
        }

        public int SpaceLength
        {
            get { return sp; }
            set { sp = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.Read("ds"))
            {
                Length = c.GetInteger("d");
                SpaceLength = c.GetInteger("sp");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("ds"))
            {
                c.SetInteger("d", Length);
                c.SetInteger("sp", SpaceLength);
            }
        }

        #endregion
    }
}